package jm.nj.demo13mian.demo05;

public class MyThread extends Thread{
    public MyThread() {
    }

    public MyThread(String name) {
        super(name);
    }

    @Override
    public void run() {
        try {
            for (int i = 0; i < 10; i++) {

                Thread.sleep(1000);
                System.out.println(Thread.currentThread().getName()+":"+i);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
